package com.caiheng.api.service.product.impl;

import com.caiheng.api.dao.product.ProductRuleMapper;
import com.caiheng.api.dao.product.ProductRuleRelationMapper;
import com.caiheng.api.entity.product.ProductRule;
import com.caiheng.api.service.base.impl.BaseServiceImpl;
import com.caiheng.api.service.product.ProductRuleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 商品规则值(规格)Service业务层处理
 *
 * @author ruoyi
 * @date 2021-08-13
 */
@Service
public class ProductRuleServiceImpl extends BaseServiceImpl<ProductRuleMapper, ProductRule> implements ProductRuleService {

    @Resource
    private ProductRuleMapper ruleMapper;
    @Resource
    private ProductRuleRelationMapper ruleRelationMapper;

    @Override
    public List<ProductRule> getRulesByCateChildId(int cateChildId) {
        return ruleMapper.getRuleListByCateChildId(cateChildId);
    }
}
